package com.hp.tiger.chapter11;

/**
 * @author XavierDong
 **/
public class ExecutionTask implements Runnable {

    private QueryFromDBAction queryAction = new QueryFromDBAction();

    private QueryFromHttpAction queryFromHttpAction = new QueryFromHttpAction();

    @Override
    public void run() {
        Context context = ActionContext.getActionContext().getContext();
        queryAction.execute();
        System.out.println("The name query successfully!");
        queryFromHttpAction.execute();
        System.out.println("The card query successfully!");
        System.out.println("The Name is : " + context.getName() + " and  CardId " + context.getCardId());
    }
}
